import java.util.Iterator;

public class Input {
	
	int m;
	Units u;
	double conc;
	double drugamount;
	double dilutent;
	double dose;
	double volume;
	double weight;
	double rate;
	Time time;
	Iterator<Integer> currentpres = Baxterpump.Mode.Modes.iterator();
	int currentp;
	
	public
		Input() {
			conc = -1;
			dose = -1;
			volume = -1;
			weight = -1;
			drugamount = -1;
			dilutent = -1;
			rate = -1;
			time = new Time(-1,-1);
			u = null;
			m = -1;
			currentp = -1;
		}
		
		public Input(Input n) {
			conc = n.conc;
			dose = n.dose;
			volume = n.volume;
			weight = n.weight;
			drugamount = n.drugamount;
			dilutent = n.dilutent;
			rate = n.rate;
			time = n.time;
			u = n.u;
			m = n.m;
			currentp = n.currentp;
	}

		void generatePI() {
			volume = -1;
			weight = -1;
			m = Baxterpump.Mode.PI;
			u = new Units(Units.Dunits.mcghr);
			conc = 21;
			drugamount = 12;
			dilutent = 115;
			dose = 22;
			volume = 125;
			time = new Time(-1,-1);
		}
		
		void generatePW() {
			volume = -1;
			weight = 52;
			m = Baxterpump.Mode.PB;
			u = new Units(Units.Dunits.mcghr);
			conc = 21;
			drugamount = 12;
			dilutent = 125;
			dose = 23;
			volume = 125;
			time = new Time(-1,-1);
		}
		
		void generateVR() {
			dose = -1;
			weight = -1;
			m = Baxterpump.Mode.VR;
			conc = 23;
			rate = 1.16;
			volume = 125;
			drugamount = 12;
			dilutent = 125;
			u = null;
			time = new Time(-1,-1);
		}
		
		void generateVT() {
			dose = -1;
			weight = -1;
			m = Baxterpump.Mode.VT;
			conc = 24;
			volume = 125;
			time = new Time(2,30);			
			rate = -1;
			drugamount = -1;
			dilutent = -1;
			u = null;
		}

		public boolean getNextPres() {
			
			if (currentpres.hasNext()) {
			    currentp = currentpres.next();
				System.out.println("Input CurrPres:" + currentp);
				if(currentp == Baxterpump.Mode.VR) {
					generateVR();
				}
				else if(currentp == Baxterpump.Mode.VT) {
					generateVT();
				}
				else if(currentp == Baxterpump.Mode.PI) {
					generatePI();
				}
				else {
					generatePW();
				}
				return false;
			}
			else {
				return true;
			}
		}
}
